<html>
<head><meta charset="utf-8"><title>using debug! while building core · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/using.20debug!.20while.20building.20core.html">using debug! while building core</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="191221978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/using%20debug%21%20while%20building%20core/near/191221978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/using.20debug!.20while.20building.20core.html#191221978">(Mar 20 2020 at 10:08)</a>:</h4>
<p>I currently have an error while building libcore using the stage1 compiler.</p>
<p>How do I enable debug calls here?</p>
<p>my config.toml contains <code>debug-assertions = true</code> and I run <code>RUSTC_LOG=rustc_trait_selection=debug ./x.py test src/test/ui/ --stage 1 --bless --pass check</code></p>



<a name="191222434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/using%20debug%21%20while%20building%20core/near/191222434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/using.20debug!.20while.20building.20core.html#191222434">(Mar 20 2020 at 10:12)</a>:</h4>
<p><a href="https://rustc-dev-guide.rust-lang.org/compiler-debugging.html#how-to-keep-or-remove-debug-and-trace-calls-from-the-resulting-binary" target="_blank" title="https://rustc-dev-guide.rust-lang.org/compiler-debugging.html#how-to-keep-or-remove-debug-and-trace-calls-from-the-resulting-binary">https://rustc-dev-guide.rust-lang.org/compiler-debugging.html#how-to-keep-or-remove-debug-and-trace-calls-from-the-resulting-binary</a></p>
<blockquote>
<p>calls to debug! and trace! are only included in the program if debug-assertions=yes is turned on in config.toml  [...] I also think that in some cases just setting it will not trigger a rebuild, so if you changed it and you already have a compiler built, you might want to call x.py clean to force one.</p>
</blockquote>
<p>You may need to run <code>./x.py clean</code> once it seems.</p>



<a name="191222629"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/using%20debug%21%20while%20building%20core/near/191222629" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lcnr <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/using.20debug!.20while.20building.20core.html#191222629">(Mar 20 2020 at 10:14)</a>:</h4>
<p>thanks! <span aria-label="heart" class="emoji emoji-2764" role="img" title="heart">:heart:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>